package com.tql.pandian.service;

import com.ruoyi.common.datasource.annotation.Master;
import com.ruoyi.common.datasource.annotation.Slave;
import com.tql.pandian.entity.*;
import com.tql.pandian.entity.dto.MainDto;
import com.tql.pandian.entity.dto.SimpleDto;
import com.tql.pandian.entity.vo.DepotPostVo;
import com.tql.pandian.entity.vo.HillKingDeeVo;
import com.tql.pandian.vo.TqlPandianPeriodVO;
import com.tql.pandian.vo.TqlStapProlossItemVO;

import java.util.Date;
import java.util.List;

public interface ICommonService {
    public List<String> getEnabledShop();
    public String getEnabledHllShopIdByKingdeeFnumber(String fnumber);

    TqlPandianPeriodVO findEnableGenPharse(String pandianCode);

    List<FoodDetailReportDayBean> findFoodReportDay(String tableName, Long shopId, Long startDate, Long endDate);

    //FoodPeriodStat
    int batchInsertFoodStatByReportDayAndShop(List<FoodDetailReportDayBean> list,String fnumber,String month,String pandianCode,Long starttime,Long endtine);

    int batchInsertStapSaleChangeByPeriod(List<TqlStapSaleChangeEntity> list1);

    TqlPandianPeriodVO findEnableGenPharseUpper(String deptCode, String pcode);

    List<FoodBomEntity> findFoodBomByFoodCode(FoodDetailReportDayBean bean);

    String findShopDeptCodeByUserId(Long userId);

    List<HillKingDeeVo> HillKingDees();

    String findDeptCode(Long userId);

    /**
     * 获取期初盘点以及核算
     * @param pandianCode
     * @param std
     * @param etd
     * @return
     */
    List<TqlStapProlossItemVO> findStapPeriodProloss(String pandianCode, Long std, Long etd, Integer type);

    TqlStapProlossItemVO findTqlStapOutChange(String tableName, String deptCode, String stapCode, String reportDate);

    void insetBatchProlossData(List<TqlStapProloss> prolossData);

    void insetBatchProlossItemData(List<TqlStapProlossItem> prolossItemData);

    List<FoodAndBom> findFoodAndBom(String fnumber);

    List<FoodAndBom> findBillFoodPeriod( String pandianCode, String[] foodCodes);

    void deleteItemByPandinacode(String pandianCode);

    void deleteByPandinacode(String pandianCode);


    @Slave
    List<TqlHllShopBillFoodPeriod> getTqlHllShopBillFoodReportDayList(String tqlHllShopBillFoodReportDay,String pandianCode,String yyyymm, Long shopId, Long std, Long etd);

    void insertTqlHllShopBillFoodPeriod(String pandianCode, List<TqlHllShopBillFoodPeriod> list);

    List<String> findfoodCode(String fnumber, String[] arr1);

    int insertBomcardAnalysAndProfit(List<FoodAndBom> list);

    void insetBatchProlossDetailData(List<ProlossDetialDto> detialData);

    List<TqlStapProlossItemVO> selectStapInChange(String tqlStapInChange, String deptCode, Object o, Long std, Long etd);

    void deleteProlossDetailByPandinacode(String pandianCode);

    void deleteBomcardAnalys(String pandianCode);

@Slave
    List<SimpleDto> findStapAndDeptFromInAndOut(int month, String fnumber);
@Master
    List<SimpleDto> findStapAndDeptFromPandianData(String pandianCode);
    @Slave
    List<SimpleDto> findInDetailByStapAndDeptForTransferout(int month, List<String> union);
    @Slave
    List<SimpleDto> findInDetailByStapAndDeptForTransferIn(int month,  List<String> union);
    @Slave
    List<SimpleDto> findInDetailByStapAndDeptForPurcharse(int month,  List<String> union);
    @Slave
    List<SimpleDto> findInDetailByStapAndDeptForIncase(int month,  List<String> union);

    @Slave
    List<SimpleDto> findOutDetailByDeptStap(int month, List<String> list, Long std, Long etd);

    @Master
    List<SimpleDto> findLastPandianDetail(String pandianCode, List<String> list);
    @Master
    List<SimpleDto> findThisPandianDetail(String pandianCode, List<String> list);
    @Master
    void batch(List<MainDto> mains, List<SimpleDto> union);
    @Slave
    void batchBillFoodReport(int month,String fnumber);
@Master
    List<TqlHllShopBillFoodPeriod> selectBillFoodPeriod(String pandianCode);
    @Master
    List<TqlStapProloss> selectProloss(String pandianCode);

    List<FoodAndBom> findBomCardParse(String pandianCode, String type);
}
